/*
 * @描述:
 * @作者: 约訂
 * @Date: 2024-06-25 13:20:33
 * @LastEditTime: 2024-08-02 09:54:22
 * @修改人员: 约訂
 */
import request from "@/utils/request";

// 获取所有的Option
export function queryOption(data) {
  return request({
    url: "options/query",
    method: "post",
    data,
  });
}

export function getOption(options) {
  return request({
    url: "options/getOption?option=" + options,
    method: "get",
  });
}

export function createOption(data) {
  return request({
    url: "options/create",
    method: "post",
    data,
  });
}

export function updateOption(data) {
  return request({
    url: "options/update",
    method: "post",
    data,
  });
}

export function deleteOption(id) {
  return request({
    url: "options/delete?id=" + id,
    method: "get",
  });
}
/**根据字典标题值取列表 */
export function GetValueList(id) {
  return request({
    url: "Options/GetOptionsByDictVal?dictVal=" + id,
    method: "get",
  });
}
export default {
  queryOption,
  getOption,
  createOption,
  updateOption,
  deleteOption,
  GetValueList,
};
